package display3d.alternativa {
	import alternativa.engine3d.materials.TextureMaterial;
	import alternativa.engine3d.materials.FillMaterial;
	import alternativa.engine3d.core.Object3DContainer;
	import alternativa.engine3d.primitives.Plane;
	
	
	/**
	 * @author jao
	 */
	public class Floor extends Object3DContainer {
		private var plane:Plane;
		
		[Embed(source="../assets/asphalt_texture.jpeg")]
		private var AsphaltTexture : Class;
		
		public function Floor() {
			plane = new Plane(20000,20000, 10, 10, true);
			plane.setMaterialToAllFaces(new TextureMaterial(new AsphaltTexture().bitmapData,true));
			plane.rotationX = Math.PI/2;
			addChild(plane);
		}
		
//		public function set light(value:LightBase):void{
//			plane.material.lights = [value];
//			BitmapMaterial(plane.material).shadowMethod = new SoftShadowMapMethod(value, 0.006);
//		}
	}
}
